From dc53960c99a5f8c8123dc6bf9ac4750c9a6831ae Mon Sep 17 00:00:00 2001 From: Christian Limpach Date: Fri, 11 May 2007 10:06:19 +0100 Subject: [PATCH] [qemu] Fix ia64 after removal of ia64_intrinsic.h. From: Alex Williamson Signed-off-by: Christian Limpach --- tools/ioemu/exec-all.h | 2 -- tools/ioemu/target-i386-dm/exec-dm.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ioemu/exec-all.h b/tools/ioemu/exec-all.h index d78b8ed770..f6804b1a0a 100644 --- a/tools/ioemu/exec-all.h +++ b/tools/ioemu/exec-all.h @@ -357,7 +357,6 @@ extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; -#ifndef CONFIG_DM #ifdef __powerpc__ static inline int testandset (int *p) { @@ -481,7 +480,6 @@ static inline int testandset (int *p) return __sync_lock_test_and_set (p, 1); } #endif -#endif /* !CONFIG_DM */ typedef int spinlock_t; diff --git a/tools/ioemu/target-i386-dm/exec-dm.c b/tools/ioemu/target-i386-dm/exec-dm.c index 4f56a2d715..69525a9741 100644 --- a/tools/ioemu/target-i386-dm/exec-dm.c +++ b/tools/ioemu/target-i386-dm/exec-dm.c @@ -360,6 +360,11 @@ CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index) } #ifdef __ia64__ + +#define __ia64_fc(addr) asm volatile ("fc %0" :: "r"(addr) : "memory") +#define ia64_sync_i() asm volatile (";; sync.i" ::: "memory") +#define ia64_srlz_i() asm volatile (";; srlz.i ;;" ::: "memory") + /* IA64 has seperate I/D cache, with coherence maintained by DMA controller. * So to emulate right behavior that guest OS is assumed, we need to flush * I/D cache here. -- 2.30.2